﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="ChiTietMatHang.aspx.cs" Inherits="WebTeamplate.Admin_ChiTietMatHang" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript" src="../Js/formatNumber.js"></script>

    <script type="text/javascript" src="../Js/ClientScript.js"></script>

    </script>
    <table class="small" border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td colspan="4" class="detailedViewHeader">
                <b>Quản lý danh mục mặt hàng</b>
            </td>
        </tr>
        <tr class="rowDetail" align="right">
            <td colspan="4" class="dvtCellInfo">
                (<span class="commentRequireInput">*</span>): <span class="commentRequireInputText">
                    <%=Resources.Resource.LABEL_COMMENT_REQUIRE %>
                </span>
            </td>
        </tr>
        <tr>
            <td align="left" colspan="4" class="dvtCellErrorMessage">
                <asp:ValidationSummary ID="vsumMH" CssClass="validateSumary" DisplayMode="BulletList"
                    runat="server" ShowMessageBox="true" ShowSummary="false" />
                <asp:Label ID="lblErrorMessage" runat="server" CssClass="validateSumary"></asp:Label>
            </td>
        </tr>
        <tr class="rowDetail">
            <td class="dvtCellLabel">
                <asp:Label ID="lblFormMHMaMatHang" runat="server" Text="Mã mặt hàng"></asp:Label>(<span
                    class="commentRequireInput">*</span>):
            </td>
            <td class="dvtCellInfo">
                <asp:TextBox ID="txtFormMHMaMatHang" runat="server" MaxLength="6" Text="000001" Enabled="false"
                    CssClass="detailedViewTextBox_Disable" Width="113px">
                </asp:TextBox>
                <asp:RequiredFieldValidator ID="refvFormMHMaMatHang" ControlToValidate="txtFormMHMaMatHang"
                    runat="server" SetFocusOnError="true">*</asp:RequiredFieldValidator>
            </td>
            <td class="dvtCellLabel">
                <asp:Label ID="lblMaPhuTung" runat="server" Text="Mã phụ tùng"></asp:Label>:
            </td>
            <td class="dvtCellInfo">
                <asp:TextBox ID="txtMaPhuTung" runat="server" MaxLength="50" Text="" CssClass="detailedViewTextBox"
                    Width="200px">
                </asp:TextBox>
                <asp:RequiredFieldValidator ID="refvMaPhuTung" ControlToValidate="txtMaPhuTung" runat="server"
                    SetFocusOnError="true">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="rowDetail">
            <td class="dvtCellLabel">
                <asp:Label ID="lblFormMHLoaiMatHang" runat="server" Text="Loại mặt hàng"></asp:Label>(<span
                    class="commentRequireInput">*</span>):
            </td>
            <td class="dvtCellInfo">
                <asp:DropDownList ID="drlFormMHLoaiMH" runat="server" Width="120px">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="refvFormMHLoaiMH" ControlToValidate="drlFormMHLoaiMH"
                    runat="server" SetFocusOnError="true">*</asp:RequiredFieldValidator>
            </td>
            <td class="dvtCellLabel">
                <asp:Label ID="lblNhomMatHang" runat="server" Text="Nhóm mặt hàng"></asp:Label>(<span
                    class="commentRequireInput">*</span>):
            </td>
            <td class="dvtCellInfo">
                <asp:DropDownList ID="drlFormMHNhomHH" runat="server" Width="120px">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="refvFormMHNhomMH" ControlToValidate="drlFormMHNhomHH"
                    runat="server" SetFocusOnError="true">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="rowDetail">
            <td class="dvtCellLabel">
                <asp:Label ID="lblChungXe" runat="server" Text="Chủng xe:"></asp:Label>(<span class="commentRequireInput">*</span>):
            </td>
            <td class="dvtCellInfo">
                <asp:DropDownList ID="drlChungXe" runat="server" Width="120px" AutoPostBack="True"
                    OnSelectedIndexChanged="drlChungXe_SelectedIndexChanged">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="refvChungXe" ControlToValidate="drlChungXe" runat="server"
                    SetFocusOnError="true">*</asp:RequiredFieldValidator>
            </td>
            <td class="dvtCellLabel">
                <asp:Label ID="lblXe" runat="server" Text="Seri xe"></asp:Label>(<span class="commentRequireInput">*</span>):
            </td>
            <td class="dvtCellInfo">
                <asp:DropDownList ID="drlXe" runat="server" Width="223px">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="refvXe" ControlToValidate="drlXe" runat="server"
                    SetFocusOnError="true">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr class="rowDetail">
            <td class="dvtCellLabel">
                <asp:Label ID="lblFormMHTenMatHang" runat="server" Text="Tên mặt hàng"></asp:Label>(<span
                    class="commentRequireInput">*</span>):
            </td>
            <td class="dvtCellInfo" colspan="3">
                <asp:TextBox ID="txtFormMHTenMH" runat="server" Width="732px" MaxLength="100" onblur="this.className='detailedViewTextBox'"
                    onfocus="this.className='detailedViewTextBoxOn'" CssClass="detailedViewTextBox"></asp:TextBox>
                <asp:RequiredFieldValidator ID="refvFormMHTenMH" ControlToValidate="txtFormMHTenMH"
                    runat="server" SetFocusOnError="true" Display="Dynamic">*</asp:RequiredFieldValidator>
            </td>
           
        </tr>
        <tr class="rowDetail">
            <td class="dvtCellLabel" width="150px">
                <asp:Label ID="lblFormMHHieu" runat="server" Text="Hiệu"></asp:Label>:
            </td>
            <td class="dvtCellInfo">
                <asp:TextBox ID="txtFormMHHieu" runat="server" Width="250px" MaxLength="100" onblur="this.className='detailedViewTextBox'"
                    onfocus="this.className='detailedViewTextBoxOn'" CssClass="detailedViewTextBox"></asp:TextBox>
            </td>
            <td class="dvtCellLabel" width="150px">
                <asp:Label ID="lblFormMHNuocSX" runat="server" Text="Nước SX"></asp:Label>:
            </td>
            <td class="dvtCellInfo">
                <asp:DropDownList ID="drlFormMHNuocSX" runat="server" Width="120px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="rowDetail">
            <td class="dvtCellLabel">
                <asp:Label ID="lblPublish" runat="server" Text="Tình trạng"></asp:Label>(<span class="commentRequireInput">*</span>):
            </td>
            <td class="dvtCellInfo">
                <asp:DropDownList ID="drlPublish" CssClass="small" runat="server" Width="120px">
                </asp:DropDownList>
                <asp:RequiredFieldValidator ID="refvPublish" ControlToValidate="drlPublish" runat="server"
                    SetFocusOnError="true">*</asp:RequiredFieldValidator>
            </td>
            <td class="dvtCellLabel">
                <asp:Label ID="lblDVT" runat="server" Text="Đơn vị tính mặc định"></asp:Label>:
            </td>
            <td class="dvtCellInfo">
                <asp:DropDownList ID="drlDVT" runat="server" Width="120px">
                </asp:DropDownList>
            </td>
        </tr>
        <tr class="rowDetail">
            <td class="dvtCellLabel">
                <asp:Label ID="lblHinh1" runat="server" Text="Hình 1"></asp:Label>:
            </td>
            <td class="dvtCellInfo" valign="top">
                <asp:FileUpload ID="ful1" runat="server" />
                <asp:CustomValidator ID="cusvHinh1" runat="server" SetFocusOnError="true" EnableClientScript="true"
                    Display="Dynamic" ErrorMessage="RequiredFieldValidator" OnServerValidate="CheckSHinh1Valid"
                    ControlToValidate="ful1">*</asp:CustomValidator>
                <br />
                <asp:Image ID="imgHinh1" runat="server" ToolTip="Hình 1" AlternateText="Hình 1" Visible="false" />&nbsp;
                <asp:LinkButton ID="lbtnDeleteHinh1" CausesValidation="false" runat="server" Text="Xóa"
                    OnClick="lbtnDeleteHinh1_Click" Visible="false" />
            </td>
            <td class="dvtCellLabel">
                <asp:Label ID="lblHinh2" runat="server" Text="Hình 2"></asp:Label>:
            </td>
            <td class="dvtCellInfo" valign="top">
                <asp:FileUpload ID="ful2" runat="server" />
                <asp:CustomValidator ID="cusvHinh2" runat="server" SetFocusOnError="true" EnableClientScript="true"
                    Display="Dynamic" ErrorMessage="RequiredFieldValidator" OnServerValidate="CheckSHinh2Valid"
                    ControlToValidate="ful2">*</asp:CustomValidator>
                <br />
                <asp:Image ID="imgHinh2" runat="server" ToolTip="Hình 2" AlternateText="Hình 1" Visible="false" />&nbsp;
                <asp:LinkButton ID="lbtnDeleteHinh2" CausesValidation="false" runat="server" Text="Xóa"
                    OnClick="lbtnDeleteHinh2_Click" Visible="false" />
            </td>
        </tr>
        <tr>
            <td style="height: 40px;" valign="bottom" colspan="4" align="center">
                <asp:Button ID="btnSave" runat="server" CssClass="crmbutton 
small edit" Text="Save" OnClick="btnSave_Click" CausesValidation="true" />
                <asp:Button ID="btnReset" runat="server" CssClass="crmbutton 
small edit" Text="Save" OnClick="btnReset_Click" CausesValidation="true" />
                <asp:Button ID="btnCacel" runat="server" CssClass="crmbutton 
small edit" Text="Cancel" OnClick="btnCacel_Click" CausesValidation="false" />
            </td>
        </tr>
    </table>
    <input type="hidden" id="hidLanguage" value="" runat="server" />
    <input type="hidden" id="hidCurrentTagLanguage" value="0" runat="server" />

    <script type="text/javascript">
        function CheckCGiaBanValid(sender, args) {
            // alert('Check Client');
            args.IsValid = CheckCGiaIsValid(args.Value);

        }
        function TextBoxBlurGroupNumber(obj) {

            if (obj) {
                obj.className = 'detailedViewTextBox txtNumber';
                obj.value = formatNumberAutoSeparate(obj.value);
            }
        }
       
    </script>

</asp:Content>
